<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <title>Home</title>
  <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
  <script src="js/jquery.min.js"></script>
  <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
  <script src="js/modernizr.custom.js"></script>
  <link rel="stylesheet" type="text/css" href="css/component.css" />
  <style>
.main{
  color:white;
}
#fg>div{
float:left;
width:330px;
height:100%;
}
#fg>div>img{
border-radius:120px;
width:120px;
height:120px;
position:absolute;
}
#wj{
    left: 177px;
    top: 70px;
}
#zj{
    left: 20px;
    top: 70px;
}
.btn{
	margin-top: 240px;
    color: white;
    background: black;
    width: 100px;
    height: 40px;
    font-size: 22px;
    padding-top: 2px;
}
  </style>
<script>
function changewj(fg){
   $("#wj").attr("src","images/"+fg+".jpg");
   $("#zj").attr("src","images/wh.jpg");
}
function fggame(){
   var wjfgimage = $("#wj").attr("src").split("/");
   var wjfg = wjfgimage[wjfgimage.length-1].replace(".jpg","");
   //alert(wjfg);
   window.location.href = "/fgplay?wjfg="+wjfg;
}
</script>
</head>
<body>
<!--header-->
<div class="header" >


  <div class="header-top">
    <div class="container">
      <div class="head-top">
        <div class="logo">

          <h1>游戏中心</h1>

        </div>
        <div class="top-nav">
          <span class="menu"><img src="images/menu.png" alt=""> </span>

          <ul>
            <li class="active"><a class="color1" href="/">首页</a></li>
            <li><a class="color2" href="/GameList">游戏</a></li>
            <li><a class="color4" href="/NewsList">新闻</a></li>
            <li><a class="color6" href="contact.html">联系我们</a></li>
            <div class="clearfix"> </div>
          </ul>

          <!--script-->
          <script>
            $("span.menu").click(function(){
              $(".top-nav ul").slideToggle(500, function(){
              });
            });
          </script>

        </div>

        <div class="clearfix"> </div>
      </div>
    </div>
  </div>
</div>

<!--content-->
<div class="content">
  <div class="container" style="    background: #afaf63;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    height: 600px;">
    <div class="content-top">
      <div class="wrap">
        <div class="main" style="margin-top:-40px;">
<h1  style="    margin-top: 35px;
    margin-left: 400px;">欢迎来到猜拳游戏！</h1>
      
<div id="fg" style="height:300px;width:1000px;border:3px solid #332f2f;margin-left:70px;margin-top:20px;">
<div style="position:relative;">
<span style="    position: absolute;
    top: 20px;
    left: 208px;
    font-size: 20px;">玩家</span>
<img id="wj" th:src="'images/'+${wjfg}">
</div>
<div style="    position: absolute;
    top: 50px;
    left: 150px;
    display: inline;">
<input onclick="changewj('st')" class="btn" type="button" value="石头" />
		 <input onclick="changewj('jz')" class="btn" type="button" value="剪子" />
		 <input onclick="changewj('b')" class="btn" type="button" value="布" />
</div>
<div style="text-align:center;">
<h1 style="    margin-top: 100px;
    font-size: 60px;">VS</h1>
	  <p th:text="${resultMessage}" style="margin-top:10px;padding:10px 20px;" >恭喜您，玩家胜利！</p>
	</div>
<div style="position:relative;">
<span style="    position: absolute;
    font-size: 20px;
    top: 20px;
    left: 54px;">电脑</span>
<img id="zj" th:src="'images/'+${zjfg}"></div>

</div>
         
		 <input type="button" style="color: black;
    margin-left: 500px;
    margin-top: 20px;" value="确定出手" onclick="fggame()" />
        </div>
      </div>
    </div>

  </div>
</div>
<!---->
<div class="footer">
  <p class="footer-class">Copyright &copy; 2025.Sunys</p>
</div>

</body>
</html>